<template>
  <svg class="svg-icon" aria-hidden="true">
    <use v-bind:xlink:href="iconName"></use>
  </svg>
</template>
<script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator";
@Component({
  name: "app-svg-icon"
})
export default class AppSvgIcon extends Vue {
  @Prop({ type: String, required: true })
  iconClass!: string;

  get iconName() {
    return `#icon-${this.iconClass}`;
  }
}
</script>
<style lang="scss">
.svg-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>

